<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;

//创建规则[demo/]，后面有二个可选参数，替换掉原来较长的URL地址
//Route::rule('demo/[:study]/[:name]','index/Index/demo/');
//Route::rule('demo/','index/Index/demo');
Route::rule([
	//'api/:name/:fun'    =>  'api/:name/:fun',
    'txt/:action'           =>  'api/Txt/:action',
    'txt'                   =>  'api/txt/index',
    'doc/demo'              =>  'api/demo/index',
    'demo/:name'            =>  'index/Index/demo',
    'name/[:name]'          =>   'index/Index/getName',
    'kj/:action'            =>  'api/Kj/:action',
    'rename/:action'        =>  'api/rename/:action',
    'courseware/:action'    =>  'api/Courseware/:action',
    'suffix'                =>  'api/Suffix/index',
    'test/:action'          =>  'api/Test/:action',
    'test'                  =>  'api/Test/index',
    'txtnum/:action'        =>  'api/TxtNum/:action',
    'txtnum'                =>  'api/TxtNum/index',
	]);
/*return [
    '__pattern__' => [
        'name' => '\w+',
    ],
    '[hello]'     => [
        ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
        ':name' => ['index/hello', ['method' => 'post']],
    ],
    'api/:name/:fun'	=>	'api/:name/:fun',
    'demo'=>'@index/Index/demo'
];*/
